package edu.cicese.alz.reports;

import java.awt.Graphics;
import java.awt.Graphics2D;

/**
 * Created by: Eduardo Quintana Contreras
 * Date: 3/08/12
 * Time: 12:39 PM
 */
public class BlockNFCPreview extends BlockPreview{
	
	@Override
	public void paintComponent(Graphics g) {
		if (nfcValues != null) {
			Graphics2D g2 = (Graphics2D) g;

			g2.setColor(colorNfcNoData);
			g2.fillRect(0, 0, this.getWidth(), this.getHeight());

			for (BlockColor blockColor : nfcValues) {
				if (blockColor.getNfcTag().getProfileCheckBox().isSelected()) {
					int x = blockColor.getX();
					int y = blockColor.getY();
					g2.setColor(blockColor.getNfcTag().getColor());
					g2.drawLine(x, y * 30, x, y * 30 + 30);
				}
			}
		}
	}
}
